﻿using GalaSoft.MvvmLight.Messaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

[assembly: log4net.Config.XmlConfiguratorAttribute(ConfigFile = "Log.config", Watch = true)]
namespace Comm
{
    public class Logger
    {
        public static readonly log4net.ILog Log
                 = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public static void Info(string msg)
        {
            Log.Info(msg);
            Messenger.Default.Send<string>(msg, "ReceiveEventInfo");
        }
        public static void Error(string msg)
        {
            Log.Error(msg);
            Messenger.Default.Send<string>(msg, "ReceiveEventInfo");
        }
        public static void Debug(string msg)
        {
            Log.Debug(msg);
            Messenger.Default.Send<string>(msg, "ReceiveEventInfo");
        }
    }
    
}
